package com.znf4.good.crops.server.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.znf4.good.crops.entity.Crops;
import com.znf4.good.crops.mapper.CropsMapper;
import com.znf4.good.crops.server.CropsServer;

@Service
public class CropsServerImpl implements CropsServer {
	
	
	@Autowired
	private CropsMapper cropsMapper ;
	
	
	
	/**
	 *  添加 农作物商品
	 */
	public void addCropsGood(Crops crops) {
		cropsMapper.insert(crops) ;
	}

	/**
	 *  修改农作物商品基本信息
	 */
	public void updateCropsGood(Crops crops) {
		cropsMapper.update(crops) ;
		
	}

	/**
	 * 删除一条数据
	 */
	public void delOneCropsGood(Crops crops) {
		cropsMapper.deleteOne(crops) ;
		
	}
	
	/**
	 * 删除多条数据
	 */
	public void delAllCropsGood(List<Crops> list) {
		cropsMapper.deleteAll(list) ;
		
	}

	public Crops queryOne(Crops crops) {
		return cropsMapper.queryOne(crops);
	}

	public List<Crops> queryAll(Crops crops) {
		return cropsMapper.queryAll(crops);
	}
	
	
	
	
	

}
